home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdiattr2.s < prev    next >
Text File  |  1990-11-23  |  3KB  |  89 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST VDI bindings.
  5. ;* Copyright (c) Nov 1988, by Ian Lepore.
  6. ;* See full copyright statement in file VDI@NOTE.S for details.
  7. ;*
  8. ;*========================================================================
  9.  
  10.           .iif      !(^^macdef VContrl),.include  "vdimacro.s"
  11.                     
  12. ;*************************************************************************
  13. ;*
  14. ;* Attribute functions 2.
  15. ;*  Polyline- and polymarker-related stuff.
  16. ;*
  17. ;*  _vsl_width        - Set polyline width.
  18. ;*  _vsl_ends         - Set polyline end types.  
  19. ;*  _vsm_height       - Set polymarker height.  
  20. ;*
  21. ;*************************************************************************
  22.  
  23. ;*------------------------------------------------------------------------
  24. ;* Set polyline width.
  25. ;*------------------------------------------------------------------------
  26.  
  27. _vsl_width::
  28.           .cargs    #8,.handle.w,.width.w
  29.           link      a6,#-4              ;* Allocate ptsout[2].
  30.           
  31.           clr.w     -(sp)               ;* ptsin[1] = 0
  32.           move.w    .width(a6),-(sp)    ;* ptsin[0] = width
  33.           move.l    sp,a0               ;* Save a pointer to ptsin.
  34.  
  35.           VContrl   #16,,#1
  36.  
  37.           pea       -4(a6)              ;* -> ptsout
  38.           subq.l    #4,sp               ;* -> intout
  39.           move.l    a0,-(sp)            ;* -> ptsin
  40.           subq.l    #4,sp               ;* -> intin
  41.           pea       16(sp)              ;* -> contrl
  42.  
  43.           moveq.l   #$73,d0
  44.           move.l    sp,d1
  45.           trap      #2
  46.           move.w    -4(a6),d0           ;* Return ptsout[0].
  47.           unlk      a6
  48.           rts
  49.  
  50. ;*------------------------------------------------------------------------
  51. ;* Set polyline end styles.
  52. ;*------------------------------------------------------------------------
  53.  
  54. _vsl_ends::
  55.           .cargs    #8,.handle.w,.begstyle.w,.endstyle.w
  56.           link      a6,#0
  57.           
  58.           VContrl   #108,,,#2
  59.           
  60.           lea       -12(sp),sp          ;* -> ptsin
  61.           pea       .begstyle(a6)       ;* -> intin
  62.           pea       16(sp)              ;* -> contrl
  63.  
  64.           jmp       vdicall
  65.           
  66. ;*------------------------------------------------------------------------
  67. ;* Set polymarker height.
  68. ;*------------------------------------------------------------------------
  69.  
  70. _vsm_height::
  71.           .cargs    #8,.handle.w,.height.w
  72.           link      a6,#-4              ;* Allocate ptsout[2].
  73.           
  74.           move.w    .height(a6),-(sp)   ;* ptsin[1] = height.
  75.           clr.w     -(sp)               ;* ptsin[0] = 0.
  76.           move.l    sp,a0
  77.  
  78.           VContrl   #16,,#1
  79.  
  80.           pea       -4(a6)              ;* -> ptsout
  81.           subq.l    #4,sp               ;* -> intout
  82.           move.l    a0,-(sp)            ;* -> ptsin
  83.           subq.l    #4,sp               ;* -> intin
  84.           pea       16(sp)              ;* -> contrl
  85.  
  86.           jmp       vdicall             ;* Do it, return ptsout[1].
  87.           
  88. ;*         end of code
  89.